import request from '../../utils/request'


// 查询每日课程列表
export function getScheduleList(params) {
    return request({
        url: '/system/schedule/list',
        method: 'get',
        params
    })
}

// 导出每日课程列表
export function exportSchedule(params) {
    return request({
        url: '/system/schedule/export',
        method: 'post',
        params,
        responseType: 'blob'
    })
}

// 获取每日课程详细信息
export function getScheduleDetail(id) {
    return request({
        url: `/system/schedule/${id}`,
        method: 'get'
    })
}

// 新增每日课程
export function addSchedule(data) {
    return request({
        url: '/system/schedule',
        method: 'post',
        data
    })
}

// 修改每日课程
export function updateSchedule(data) {
    return request({
        url: '/system/schedule',
        method: 'put',
        data
    })
}

// 删除每日课程
export function deleteSchedule(ids) {
    return request({
        url: `/system/schedule/${ids.join(',')}`,
        method: 'delete'
    })
}